﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Resumption_Duty_Form.aspx.cs"
    Inherits="Trig_AMJ_HR_Forms.Layouts.Trig_AMJ_HR_Forms.Resumption_Duty_Form" DynamicMasterPageFile="~masterurl/default.master" %>

<%@ Register TagPrefix="trig" TagName="ResumpCmnts" Src="~/_controltemplates/Trig_AMJ_AMG_Forms/TrigAMJFormsComments/TrigAMJFormsCommentsUserControl.ascx" %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <link rel="Stylesheet" type="text/css" href="/Style Library/Al Majed/CSS/Trig_HR.css" />
    <script language="javascript" src="/_layouts/Scripts/validation.js" type="text/javascript"></script>
    <style type="text/css">
        #s4-leftpanel
        {
            display: none;
        }
        .s4-ca
        {
            margin-left: 0px;
        }
        .ms-validations
        {
            color: Red;
        }
        .style2
        {
            width: 373px;
        }
        .style3
        {
            width: 366px;
        }
        body, td, th
        {
            font-size: 8pt;
            font-family: Verdana, Arial, sans-serif;
        }
    </style>
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <asp:Panel ID="pnlFullForm" runat="server" CssClass="pnlAMFform">
        <table cellpadding="0" cellspacing="0" class="tbl-main">
            <tr>
                <td colspan="4" class="formtitle">
                    Resumption of Duty
                </td>
            </tr>
            <tr>
                <td colspan="4" class="Note-td">
                    <asp:Label ID="lblnote1" runat="server" Text="Some notes will be come here!!!" CssClass="Notes-msg"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Reference No :
                </td>
                <td>
                    <asp:Label ID="lblResumpReqNo" runat="server" Text="Reference number will be generated upon save"
                        Font-Bold="True" Font-Size="XX-Small" CssClass="ms-long ms-spellcheck-true" ForeColor="Red"></asp:Label>
                </td>
                <td>
                    Date of filling :
                </td>
                <td>
                    <SharePoint:DateTimeControl ID="dtpDate" runat="server" DateOnly="true" IsRequiredField="true"
                        Enabled="false" LocaleId="2057" ErrorMessage="Please specify the date" />
                </td>
            </tr>
            <tr>
                <td>
                    Leave Reference No :
                </td>
                <td>
                    <asp:Label ID="lblLevReqNo" runat="server" Text="Leave Reference No" Font-Bold="True"
                        Font-Size="XX-Small" CssClass="ms-long ms-spellcheck-true" ForeColor="Red"></asp:Label>
                </td>
                <td>
                    Date of Request :
                </td>
                <td>
                    <SharePoint:DateTimeControl ID="dtLeaveReqDate" runat="server" DateOnly="true" IsRequiredField="true"
                        LocaleId="2057" Enabled="false" ErrorMessage="Please specify the date" />
                </td>
            </tr>
            <tr>
                <td colspan="4" class="tdHeadingTextLeftAlign">
                    Employee Info
                </td>
            </tr>
            <tr>
                <td>
                    Name : <span title="This is a required field." class="ms-validations"><strong>*</strong></span>
                </td>
                <td>
                    <SharePoint:PeopleEditor runat="server" ID="pplReqUser" MultiSelect="false" Width="250px"
                        AutoPostBack="true" />
                </td>
                <td>
                    Employee ID :
                </td>
                <td>
                    <asp:TextBox ID="txtReqEmpId" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Division :
                </td>
                <td>
                    <asp:TextBox ID="txtReqDivision" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
                <td>
                    Department :
                </td>
                <td>
                    <asp:TextBox ID="txtReqDepartment" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Designation :
                </td>
                <td>
                    <asp:TextBox ID="txtReqDesignation" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
                <td>
                    Passport No :
                </td>
                <td>
                    <asp:TextBox ID="txtPastportNo" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4" class="tdHeadingTextLeftAlign">
                    Leave Info
                </td>
            </tr>
            <tr>
                <td>
                    Leave Type :
                </td>
                <td>
                    <asp:TextBox ID="txtLeaveType" runat="server" ReadOnly="true" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Travel Date :
                </td>
                <td>
                    <SharePoint:DateTimeControl ID="dtTravelDt" runat="server" DateOnly="true" IsRequiredField="true"
                        LocaleId="2057" Enabled="false" ErrorMessage="Please specify the date" />
                </td>
                <td>
                    Return Date :
                </td>
                <td>
                    <SharePoint:DateTimeControl ID="dtReturnDt" runat="server" DateOnly="true" IsRequiredField="true"
                        LocaleId="2057" Enabled="false" ErrorMessage="Please specify the date" />
                </td>
            </tr>
            <tr>
                <td>
                    Number of days excess (if any) :
                    <input id="remember" runat="server" name="remember" type="checkbox" onclick="javascript:validate();" />
                </td>
                <td>
                    <asp:TextBox ID="txtExcessLeaveDays" runat="server" onkeypress="return isNumberKey(this)"
                        Width="250px"></asp:TextBox>
                    <asp:TextBox ID="txtExcLeaveDays" runat="server" Width="250px" Visible="false" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Action (if any) :
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txtAction" runat="server" Width="625px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Resumption of duty: <span title="This is a required field." class="ms-validations"><strong>
                        *</strong></span>
                </td>
                <td colspan="3">
                    <SharePoint:DateTimeControl ID="dtResumptionDt" runat="server" DateOnly="true" LocaleId="2057" />
                </td>
            </tr>
            <tr runat="server" id="trHandedover">
                <td>
                    Passport Handed over:
                    <input type="checkbox" id="confirm" runat="server" name="confirm" onclick="javascript:validateHand();" />
                </td>
                <td runat="server" id="tdHandedover">
                    <SharePoint:DateTimeControl ID="dtHandoverDt" runat="server" DateOnly="true" IsRequiredField="true"
                        LocaleId="2057" ErrorMessage="Please specify the date" />
                </td>
            </tr>
            <tr>
                <td colspan="4" class="tdHeadingTextLeftAlign">
                    Comments / Workflow Area
                </td>
            </tr>
            <tr>
                <td colspan="4" style="padding: 10px;">
                    <trig:ResumpCmnts ID="ResumpCmnts" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <table width="100%" cellpadding="0" cellspacing="0" class="Section-Approver">
                        <asp:Panel ID="pnlCommentArea" runat="server" class="Section-Approver">
                            <tr>
                                <td colspan="4" class="AppHeading">
                                    <strong>Comments</strong><span class="ms-validations" title="This is a required field."><strong>
                                        *</strong></span>
                                </td>
                            </tr>
                            <tr>
                                <td width="150px">
                                    <asp:Image ID="ImgUser" runat="server" Height="50px" Width="50px" />
                                    <br />
                                    <asp:Label ID="LblCommentsUserName" runat="server" Font-Bold="True" Font-Size="XX-Small"
                                        ForeColor="#003399" Text=""></asp:Label>
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="TxtComments" runat="server" TextMode="MultiLine" Width="625px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr id="upAtt" runat="server">
                                <td width="150px">
                                    Upload Attachment
                                </td>
                                <td colspan="3">
                                    <asp:FileUpload ID="upfile" runat="server" CssClass="ms-fileinput" Width="250px" />
                                </td>
                            </tr>
                        </asp:Panel>
                        <asp:Panel ID="pnlForward" runat="server" Visible="false">
                            <tr>
                                <td colspan="4" style="text-align: left; background-color: #121e66; color: #ffffff;
                                    font-weight: bold; padding: 10px;">
                                    <table cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                    <ContentTemplate>
                                                        <asp:RadioButton ID="rtbSendBack" runat="server" Text="Send Back" GroupName="Users"
                                                            AutoPostBack="true" onclick="javascript:fnSendBackUsers(this)" />
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="rtbSendBack" EventName="CheckedChanged" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                            <td>
                                                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                                    <ContentTemplate>
                                                        <asp:RadioButton ID="rtbForwardOthers" runat="server" Text="Forward to other user"
                                                            AutoPostBack="true" GroupName="Users" onclick="javascript:fnForwardUsers(this)" />
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="rtbForwardOthers" EventName="CheckedChanged" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                            <td>
                                                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                                    <ContentTemplate>
                                                        <asp:RadioButton ID="rtbForward" runat="server" Text="Forward" GroupName="Users"
                                                            AutoPostBack="true" onclick="javascript:fnForword(this)" />
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="rtbForward" EventName="CheckedChanged" />
                                                    </Triggers>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                                    <ContentTemplate>
                                                        <asp:Label ID="lblWFStaticUser" runat="server" Text="" Font-Bold="True" Font-Size="XX-Small"
                                                            ForeColor="Yellow"></asp:Label>
                                                        <asp:Label ID="lblSendBacktoUser" runat="server" Text="" Font-Bold="True" Font-Size="XX-Small"
                                                            ForeColor="Yellow" Visible="false"></asp:Label>
                                                        <asp:Label ID="lblsendBackUserValue" runat="server" Text="" Font-Bold="True" Font-Size="XX-Small"
                                                            ForeColor="Yellow"></asp:Label>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="padding: 10px; display: none" id="trotherUsers">
                                <td style="padding: 10px; font-weight: bold; color: #121e66;" width="130px">
                                    User Name :
                                </td>
                                <td style="padding: 10px;" colspan="3">
                                    <asp:Label ID="lblCNTSectionMsg" runat="server" Text=""></asp:Label>
                                    <SharePoint:PeopleEditor ID="pplcnt" runat="server" MultiSelect="false" AllowEmpty="false"
                                        Width="250px" ForeColor="Red" AutoPostBack="false" />
                                </td>
                            </tr>
                        </asp:Panel>
                        <asp:Panel runat="server" ID="btnCntrls">
                            <tr>
                                <td colspan="4">
                                    <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                                        <ContentTemplate>
                                            <asp:Label ID="lblError" runat="server" CssClass="error-msg" Text=""></asp:Label>
                                            <asp:Label ID="lblErrors" runat="server" CssClass="error-msg" Text="" Visible="false"></asp:Label>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" class="tblButtons" style="padding-top: 5px;">
                                    <asp:HiddenField runat="server" ID="ckSubmit" Value="false" />
                                    <asp:Button ID="btnSubmit" runat="server" CssClass="ms-ButtonHeightWidth" Text="Submit"
                                        OnClick="btnSubmit_Click" OnClientClick="javascript:return fnValidation();" />
                                    <asp:Button ID="btnApprove" runat="server" CssClass="ms-ButtonHeightWidth" Text="Approve"
                                        OnClick="btnApprove_Click" OnClientClick="javascript:return fnValidationApprove();"
                                        Visible="false" />
                                    <asp:Button ID="btnReject" runat="server" CssClass="ms-ButtonHeightWidth" Text="Reject"
                                        OnClick="btnReject_Click" Visible="false" OnClientClick="javascript:return fnValidationApprove();" />
                                    <input id="btnCancel" class="ms-ButtonHeightWidth" type="button" value="Close" accesskey="C"
                                        onclick="window.parent.history.back()" runat="server" />
                                </td>
                            </tr>
                        </asp:Panel>
                    </table>
                </td>
            </tr>
            <asp:Panel ID="pnlView" runat="server" Visible="false">
                <tr>
                    <td colspan="4" style="text-align: center;">
                        <input id="btnViewClose" class="btn-Cancel" type="button" onclick="window.parent.history.back()"
                            value="Close" accesskey="C" />
                    </td>
                </tr>
            </asp:Panel>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlAccessDenied" runat="server" Visible="false" CssClass="pnlAMFform">
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td style="text-align: center;">
                    <asp:Label ID="lblAccessDeniedMsg" runat="server" Text="" Font-Size="Medium" ForeColor="Red"
                        Font-Bold="True" Visible="false"></asp:Label>
                    <asp:Label ID="lblUserNotvailable" runat="server" Text="" Font-Size="Medium" ForeColor="Red"
                        Font-Bold="True" Visible="false"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: center; padding-top: 10px;">
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/_layouts/1033/IMAGES/IRForm/AccessDeniedImage.png" />
                </td>
            </tr>
            <tr>
                <td style="text-align: center; padding-top: 10px">
                    <input id="butonclose" class="ms-ButtonHeightWidth" type="button" onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel, 'Cancel clicked'); return false;"
                        value="Close" accesskey="C" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <script language="javascript" type="text/javascript">

        document.getElementById('<%=txtExcessLeaveDays.ClientID %>').style.display = "none";

        var imgDt = document.getElementById('ctl00_PlaceHolderMain_dtHandoverDt_dtHandoverDtDateDatePickerImage')
        var txtDt = document.getElementById('ctl00_PlaceHolderMain_dtHandoverDt_dtHandoverDtDate');
        imgDt.style.display = "none";
        txtDt.style.display = "none";

        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode
            if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }

        function validate() {
            debugger;
            elam = document.getElementById('ctl00_PlaceHolderMain_txtExcessLeaveDays');
            debugger;
            if (document.getElementById('ctl00_PlaceHolderMain_remember').checked) {
                elam.style.display = "block";
            }
            else {
                elam.style.display = "none";
            }
        }

        function validateHand() {
            debugger;
            if (document.getElementById('ctl00_PlaceHolderMain_confirm').checked) {
                imgDt.style.display = "block";
                txtDt.style.display = "block";
            } else {
                imgDt.style.display = "none";
                txtDt.style.display = "none";
            }
        }

    </script>
    <script language="javascript" type="text/javascript">

        document.getElementById('<%= lblError.ClientID  %>').innerHTML = "";
        document.getElementById('<%= lblError.ClientID  %>').style.display = "none";

        document.getElementById('<%= trHandedover.ClientID  %>').style.display = "none";

        function getParameterByName(name) {
            name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
            var regexS = "[\\?&]" + name + "=([^&#]*)";
            var regex = new RegExp(regexS);
            var results = regex.exec(window.location.search);
            if (results == null)
                return "";
            else
                return decodeURIComponent(results[1].replace(/\+/g, " "));
        }

        function Trim(TrimString) {
            var tempObj;
            if (TrimString) { tempObj = TrimString; TrimString = tempObj.value; }
            if (TrimString == "undefined" || TrimString == null) return null;
            if (TrimString.length == 0) TrimString = "";
            else {
                var Lcont = 0, TempStrArray = TrimString.split(" "), Rcont = TempStrArray.length - 1;
                while (TempStrArray[Lcont] == "") Lcont++; while (TempStrArray[Rcont] == "") Rcont--;
                if (Rcont < Lcont) TrimString = ""; else
                    for (TrimString = TempStrArray[Lcont], Lcont++; Lcont <= Rcont; Lcont++) TrimString += " " + TempStrArray[Lcont];
                var re = /\'|/g;
                TrimString = TrimString.replace(re, "");
            }
            if (tempObj && TrimString != "undefined" && TrimString != null)
            { tempObj.value = TrimString; return tempObj }
            else return TrimString;
        }

        var querystringval = getParameterByName('Mode');

        if (querystringval == "Edit" || querystringval == "View") {
            document.getElementById('<%= trHandedover.ClientID  %>').style.display = "block";
        }

        function fnValidationApp() {
            var rval = true;
            var ErrorMsg = "";
            var objFocus;
            debugger;

            Trim(document.getElementById('<%= confirm.ClientID  %>'));
            Trim(document.getElementById('<%= dtHandoverDt.ClientID  %>'));
            Trim(document.getElementById('<%= dtpDate.ClientID  %>'));
            Trim(document.getElementById('<%= TxtComments.ClientID  %>'));
            Trim(document.getElementById('<%= dtResumptionDt.ClientID  %>'));

            var reqDt = document.getElementById('<%= dtpDate.Controls[0].ClientID  %>');
            var handDt = document.getElementById('<%= dtHandoverDt.Controls[0].ClientID %>');
            var resumpDt = document.getElementById('<%= dtResumptionDt.Controls[0].ClientID %>');

            var confirm = document.getElementById('<%= confirm.ClientID  %>');

            if (confirm.checked) {
                if (isEmpty(handDt)) {
                    ErrorMsg = "Fields marked with (*) cannot be left blank";
                    objFocus = handDt;
                    rval = false;
                }
                else {
                    if (!IsValidDateFormat(handDt.value)) {
                        ErrorMsg = "Date format should be dd/mm/yyyy !";
                        objFocus = handDt;
                        rval = false;
                    }
                    else {
                        if (!PreSaveAction(resumpDt, handDt)) {
                            ErrorMsg = "The Handover Date should be greater than the Resumption Date";
                            objFocus = handDt;
                            rval = false;
                        }
                        else {
                            if (document.getElementById('<%= TxtComments.ClientID  %>').value == "") {
                                ErrorMsg = "Fields marked with (*) cannot be left blank";
                                objFocus = document.getElementById('<%= TxtComments.ClientID  %>');
                                rval = false;
                            }
                        }
                    }
                }

            }
            else {
                if (document.getElementById('<%= TxtComments.ClientID  %>').value == "") {
                    ErrorMsg = "Fields marked with (*) cannot be left blank";
                    objFocus = document.getElementById('<%= TxtComments.ClientID  %>');
                    rval = false;
                }
            }

            if (rval == false) {
                document.getElementById('<%= lblError.ClientID  %>').style.display = "block";
                document.getElementById('<%= lblError.ClientID  %>').innerHTML = ErrorMsg;
                objFocus.focus();
            }

            else {
                document.getElementById('<%= lblError.ClientID  %>').innerHTML = "";
                document.getElementById('<%= lblError.ClientID  %>').style.display = "none";
            }

            return rval;
        }


        function fnValidation() {
            var rval = true;
            debugger;
            var querystringval = getParameterByName('Mode');
            var ErrorMsg = "";
            var objFocus;
            var reqType;

            if (querystringval == "New") {

                var elem = document.getElementById('<%=txtExcessLeaveDays.ClientID %>');
                Trim(document.getElementById('<%= TxtComments.ClientID  %>'));

                Trim(document.getElementById('<%= pplReqUser.ClientID  %>'));
                Trim(document.getElementById('<%= txtReqEmpId.ClientID  %>'));

                Trim(document.getElementById('<%= txtExcessLeaveDays.ClientID  %>'));
                Trim(document.getElementById('<%= dtResumptionDt.ClientID  %>'));
                Trim(document.getElementById('<%= dtTravelDt.ClientID  %>'));
                Trim(document.getElementById('<%= dtpDate.ClientID  %>'));

                var resumpDt = document.getElementById('<%= dtResumptionDt.Controls[0].ClientID %>');
                var travelDt = document.getElementById('<%= dtTravelDt.Controls[0].ClientID %>');
                var todayDT = document.getElementById('<%= dtpDate.Controls[0].ClientID %>');

                Trim(document.getElementById('<%= ckSubmit.ClientID  %>'));


                if (document.getElementById('<%= pplReqUser.ClientID  %>').value == "") {
                    ErrorMsg = "Fields marked with (*) cannot be left blank";
                    objFocus = document.getElementById('<%= pplReqUser.ClientID  %>');
                    rval = false;
                }

                else if (document.getElementById('ctl00_PlaceHolderMain_remember').checked && document.getElementById('<%= txtExcessLeaveDays.ClientID  %>').value == "") {

                    ErrorMsg = "Fields marked with (*) cannot be left blank";
                    objFocus = document.getElementById('<%= txtExcessLeaveDays.ClientID  %>');
                    rval = false;
                }
                else if (isEmpty(resumpDt)) {
                    ErrorMsg = "Fields marked with (*) cannot be left blank";
                    objFocus = resumpDt;
                    rval = false;
                }
                else if (!isEmpty(resumpDt)) {
                    if (!IsValidDateFormat(resumpDt.value)) {
                        ErrorMsg = "Date format should be dd/mm/yyyy !";
                        objFocus = resumpDt;
                        rval = false;
                    }
                    else {
                        if (!PreSaveAction(travelDt, resumpDt)) {
                            ErrorMsg = "The Resumption Date cannot happen earlier than the Travel Date";
                            objFocus = resumpDt;
                            rval = false;
                        }
                        else {
                            if (!PreSaveAction(resumpDt, todayDT)) {
                                ErrorMsg = "The Resumption Date cannot happen longer than the Today";
                                objFocus = resumpDt;
                                rval = false;
                            }
                            else if (document.getElementById('<%= TxtComments.ClientID  %>').value == "") {
                                ErrorMsg = "Fields marked with (*) cannot be left blank";
                                objFocus = document.getElementById('<%= TxtComments.ClientID  %>');
                                rval = false;

                            }
                        }
                    }
                }
            }

            if (rval == false) {
                document.getElementById('<%= lblError.ClientID  %>').style.display = "block";
                document.getElementById('<%= lblError.ClientID  %>').innerHTML = ErrorMsg;
                objFocus.focus();
            }
            else {
                document.getElementById('<%= ckSubmit.ClientID  %>').value = "True";
                document.getElementById('<%= lblError.ClientID  %>').innerHTML = "";
                document.getElementById('<%= lblError.ClientID  %>').style.display = "none";
            }

            if (querystringval == "Edit") {
                rval = fnValidationApp();
            }

            return rval;

        }


    </script>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    Resumption of Duty Form
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
    runat="server">
    Resumption of Duty Form
</asp:Content>
